#include "t_box_input_sequence.h"

T_Box_Input_Sequence::T_Box_Input_Sequence(T_Box_Sequence * a_seq)
    : m_seq(a_seq)
{
    Q_ASSERT(a_seq);
    m_seq_proxy = a_seq->open();
    Q_ASSERT(m_seq_proxy);
    m_media_name = m_seq_proxy->displayName();
}

T_Box_Input_Sequence::~T_Box_Input_Sequence()
{
    delete m_seq_proxy;
}

bool T_Box_Input_Sequence::isValid()
{
    return m_seq_proxy->isValid();
}

void T_Box_Input_Sequence::close()
{
    //FIXME
}

T_Box_Sequence *T_Box_Input_Sequence::sequence()
{
    return m_seq;
}

int T_Box_Input_Sequence::bufferSize()
{
    return m_seq_proxy->bufferSize();
}

qint64 T_Box_Input_Sequence::size()
{
    return m_seq_proxy->expectedSize();
}

qint64 T_Box_Input_Sequence::pos()
{
    return m_seq_proxy->pos();
}

bool T_Box_Input_Sequence::seek(qint64 offset)
{
    return m_seq_proxy->seek(offset);
}

QByteArray T_Box_Input_Sequence::wait_read(qint64 a_max_size)
{
    return m_seq_proxy->wait_read(a_max_size);
}
